#ifndef _PLANIF_HH_
#define _PLANIF_HH_
//
// Minitry of planifications
//
#include "munkres.h"
#include "Map.hh"
#include <set>
#include <utility>


struct Option
{
  uLocation from;
  uLocation to;
  double cost;


  Option() :
    from(0),to(0),cost(42.0) {}

  Option(uLocation _from, uLocation _to, double _cost = 1) :
    from(_from), to(_to), cost(_cost) {}

  bool operator<(const Option & b) const
  {
    return (from < b.from) or (from == b.from and cost < b.cost);
  }

};


std::set<std::pair<uLocation,uLocation> > get_an_optimal_plan(std::vector<Option> & options, bool minimize_cost = true);


std::ostream & dump(std::ostream & out, Map & map, const Option & opt);
std::ostream & dump(std::ostream & out, Map & map, const std::vector<Option> & options);
std::ostream & dump(std::ostream & out, const std::vector<Option> & options);

#endif /* _PLANIF_HH_*/
